﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Templates.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="XToolTip" TargetType="ToolTip">
        <Setter Property="Background" Value="White"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" CornerRadius="2,2,2,2" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}">
                        <StackPanel Background="{TemplateBinding Background}" >
                            <TextBlock FontWeight="Bold" Background="Gold" Foreground="White" Margin="0" Text="Information"/>
                            <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="XButton" TargetType="Button">
        <Style.Triggers>
            <Trigger Property="IsPressed" Value="true">
                <Setter Property="BitmapEffect">
                    <Setter.Value>
                        <OuterGlowBitmapEffect GlowColor="Gold" GlowSize="5" Noise="0" Opacity="1"/>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="IsPressed" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <ScaleTransform ScaleX="1.1" ScaleY="1.1"/>
                    </Setter.Value>
                </Setter>
                <Setter Property="RenderTransformOrigin" Value=".5,.5"/>
                <Setter Property="BitmapEffect">
                    <Setter.Value>
                        <OuterGlowBitmapEffect GlowColor="Gold" GlowSize="5" Noise="0" Opacity="1"/>
                    </Setter.Value>
                </Setter>
            </MultiTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="MyStyle" TargetType="Button">
        <Style.Triggers>
            <Trigger Property="IsPressed" Value="true">
                <Setter Property="Template" Value="{DynamicResource MyTemplatePressed}"/>
            </Trigger>
        </Style.Triggers>
        <Setter Property="Template" Value="{DynamicResource MyTemplate}"/>
    </Style>

    <Style x:Key="FooStyle" TargetType="Button">
        <Style.Triggers>
            <Trigger Property="IsPressed" Value="true">
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <ScaleTransform ScaleX=".9" ScaleY=".9"/>
                    </Setter.Value>
                </Setter>
                <Setter Property="RenderTransformOrigin" Value=".5,.5"/>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="IsPressed" Value="False"/>
                </MultiTrigger.Conditions>
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <ScaleTransform ScaleX="1.1" ScaleY="1.1"/>
                    </Setter.Value>
                </Setter>
                <Setter Property="RenderTransformOrigin" Value=".5,.5"/>
            </MultiTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="ListViewItem">
        <Style.Setters>
            <Setter Property="Template" Value="{StaticResource ListViewTemplate}"/>
        </Style.Setters>
    </Style>
</ResourceDictionary>